﻿#region License

// Another free, open solution by someone who gets it.
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#endregion

using System.Reflection;

namespace Patterns.Reflection
{
	/// <summary>
	/// 	Provides easy access to commonly used <see cref = "BindingFlags" /> combinations.
	/// </summary>
	public static class MemberVisibility
	{
		/// <summary>
		/// 	Combines the IgnoreCase, Public, and Instance BindingFlags values.
		/// </summary>
		public static BindingFlags PublicInstance
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, NonPublic, and Instance BindingFlags values.
		/// </summary>
		public static BindingFlags NonPublicInstance
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.NonPublic | BindingFlags.Instance; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, Public, NonPublic, and Instance BindingFlags values.
		/// </summary>
		public static BindingFlags Instance
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, Public, and Static BindingFlags values.
		/// </summary>
		public static BindingFlags PublicStatic
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Static; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, NonPublic, and Static BindingFlags values.
		/// </summary>
		public static BindingFlags NonPublicStatic
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.NonPublic | BindingFlags.Static; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, Public, NonPublic, and Static BindingFlags values.
		/// </summary>
		public static BindingFlags Static
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, Static, Instance, and Public BindingFlags values.
		/// </summary>
		public static BindingFlags Public
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, Static, Instance, and NonPublic BindingFlags values.
		/// </summary>
		public static BindingFlags NonPublic
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic; }
		}

		/// <summary>
		/// 	Combines the IgnoreCase, Public, NonPublic, Instance, and Static BindingFlags values.
		/// </summary>
		public static BindingFlags All
		{
			get { return BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; }
		}
	}
}